// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import FastClick from 'fastclick'
import VueRouter from 'vue-router'
import App from './App'
import Home from './components/HelloFromVux'
import router from './router/index'
import store from './vuex/store'
import Viewer from 'v-viewer'
import VueLazyload from 'vue-lazyload'
import 'viewerjs/dist/viewer.css'
import errorImg from '@/assets/error.png'
import loadingImg from '@/assets/loading.gif';
import preview from 'vue-photo-preview'
import 'vue-photo-preview/dist/skin.css';

//Vue.prototype.$baseUrl = "http://192.168.0.130:9091"
Vue.prototype.$baseUrl = ""

Vue.use(VueRouter)
Vue.use(Viewer);

var option = {
  maxSpreadZoom: 1, // 控制预览图最大的倍数，默认是2倍，我这里改成了原图
 fullscreenEl: false, //控制是否显示右上角全屏按钮
  closeEl: false, //控制是否显示右上角关闭按钮
  tapToClose: true, //点击滑动区域应关闭图库
  shareEl: false, //控制是否显示分享按钮
  zoomEl: false, //控制是否显示放大缩小按钮
  counterEl: false, //控制是否显示左上角图片数量按钮
  arrowEl: true,  //控制如图的左右箭头（pc浏览器模拟手机时）
  tapToToggleControls: true, //点击应切换控件的可见性
  clickToCloseNonZoomable: true //点击图片应关闭图库，仅当图像小于视口的大小时
}

Vue.use(preview,option)
Viewer.setDefaults({
  zIndexInline: 9999
})

Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: errorImg,
  loading: loadingImg,
  attempt: 1
})

const routes = [{
  path: '/',
  component: Home
}]

FastClick.attach(document.body)

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app-box')
